﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace DotNETX.Version
{
    [ServiceContract(SessionMode = SessionMode.Required)]
    public interface IVersionService
    {
        [OperationContract]
        VersionInfo GetLatestVersion();

        [OperationContract]
        bool SetCurrentVersion(VersionInfo versionInfo);
    }

    [DataContract]
    public class VersionInfo
    {
        [DataMember]
        public string VersionName
        {
            get;
            set;
        }

        [DataMember]
        public DateTime ReleaseDate
        {
            get;
            set;
        }

        [DataMember]
        public string Description
        {
            get;
            set;
        }
    }
}
